package com.zycfc.zsf.boot.serializer.hessian;

import java.lang.ref.*;
import java.io.*;
import com.caucho.hessian.io.*;

public class SoftReferenceDeserializer extends AbstractMapDeserializer
{
    public Object readObject(final AbstractHessianInput in, final Object[] fields) throws IOException {
        try {
            SoftReference<Object> obj = this.instantiate();
            in.addRef((Object)obj);
            final Object value = in.readObject();
            obj = null;
            return new SoftReference(value);
        }
        catch (IOException e) {
            throw e;
        }
        catch (Exception e2) {
            throw new IOExceptionWrapper((Throwable)e2);
        }
    }
    
    protected SoftReference<Object> instantiate() throws Exception {
        final Object obj = new Object();
        return new SoftReference<Object>(obj);
    }
}
